1. Technical Field
The invention is related to a system and process for automatically determining optimal image compression methods for reducing file size, and more particularly, to a system and process for automatically determining optimal compression methods on an image by image basis for images in an electronic file.
2. Related Art
By way of background, one current scheme for controlling the size of images in a conventional word processing application is to either manually reduce image file size before inserting the image into a word processing file, or to launch an image editing application when an image in the word processing file is manually selected. This image editing application is used to manually control the size of the image in the word processing file. Further, it is often necessary to create and maintain several versions of the same image for different usage. For example, a word processing file that will only be rendered to a screen can have images with lower resolution than a word processing file that will be printed to a high-resolution printer. Consequently, because of the potentially significant variation in file size for these two uses, it may be necessary to maintain two separate versions of the electronic document to support these uses.
Further, with many conventional applications, images may be inserted into electronic files associated with the applications using any of a number of techniques. Many of these techniques often create unacceptably large image files, or create image files containing unacceptably large amounts of data, or even image files that contain unnecessary data. For example, some applications allow an image to be inserted directly into an electronic file via a scanner or electronic camera. Typically, the user scans a picture into the electronic document and uses a “crop tool” or similar feature to reduce the image size or zoom into a specific portion of the image. However, cropping the image in this manner typically doesn't translate in any reduction in the final document size because the cropped portion of the image is still maintained by the host application to allow a user to undo or modify the cropping of the associated image.
Another example of inserting an image into an electronic file or electronic document from within a host application, involves allowing a user to copy and paste a screen image into the electronic document. However, if the system color setting of the computer display is “True Color”, the copy and paste of a simple screen image is done using 24 bits per pixels, even if an 8 bit palettized copy of the image would provide an indistinguishable image. Most modern computers display high-bit color schemes (16, 24 or even 32-bit color schemes) due to the power of conventional graphics accelerators and the capabilities of computer display monitors. Unfortunately, a 24-bit image is approximately three times larger than an 8-bit image. Thus, such copy and paste or cut and paste screen images tend to be substantially larger than necessary.
A further example of inserting an image into an electronic document involves the use of an inappropriate scanned image resolution. Modern scanners provide extremely high-resolution capabilities, with some scanners exceeding a 1200 dpi optical resolution. Often, users are unfamiliar with the effect of image resolution on image size, and when scanning an image will simply choose a “best” option, or the like, in an attempt to make the image look as good as possible. However, the document size grows dramatically when increasing image resolution since image size increases with the square of the resolution. For example, an image scanned at 300 dpi is approximately four times larger than an image scanned at 150 dpi, while an image scanned at 1200 dpi is approximately sixty-four times larger than the 150 dpi image. While the user may not even be aware of the size of the scanned image file, the size of that image often makes it impossible to email the file or even store the file on a floppy disk or other computer readable storage medium.
Still other methods of inserting images into an electronic document include cutting and pasting or copying and pasting an image from one application into a host application being used to create or edit the electronic document into which the image is being inserted. Unfortunately, in conventional operating systems, OLE data streams are often associated with images that are either cut or copied in one application, and then pasted into another application. OLE data streams, in some cases, actually contain more data than the image would contain by itself. For example, where the user manually compresses the inserted image, such as for example by converting an inserted bitmap (BMP) image to a JPEG image, an OLE data stream associated with the image may actually include the uncompressed BMP version of the image data, along with other data relating to the application used to create or edit the image. Typically, the user is not aware of such problems, and in fact, is rarely aware that an OLE data stream may be associated with an image, or that an OLE data stream even exists.
Further, users are typically unaware of the optimum compression method or file format for images, or even how or why an image should be converted from one format to another. Consequently, users often insert images in an inappropriate native image file format. Further, some images such as photographs should be compressed using specific encoding schemes such as a JPEG encoding scheme, while other non-photographic images are better compressed by simply palettizing the image. Unfortunately, typical applications do not automatically distinguish between photographic and non-photographic images when compressing such images.
Consequently, what is needed is a technique for automatically determining an optimal method for reducing the size of an electronic file containing at least one linked or embedded image by automatically determining an optimal compression method for each image in the electronic file. Further, such a technique should provide a capability for output specific compression by tailoring image resolution to particular output devices. In addition, such a technique should be capable of further reducing image size by providing a capability to discard non-essential data such as OLE data streams.